/*************************************************************************
	> File Name: P1510.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-04-16 13:34:45
 ************************************************************************/

#include <iostream>
using namespace std;

#define MAX_N 10000

int dp[MAX_N + 5], k[MAX_N + 5], m[MAX_N + 5];

int main() {
    int v, n, c;
    cin >> v >> n >> c;
    for (int i = 0, k, m; i < n; i++) {
        scanf("%d%d", &k, &m);
        for (int j = c; j >= m; j--) {
            dp[j] = max(dp[j], dp[j - m] + k);
        }
    }
    int flag = 0;
    for (int i = 1; i <= c; i++) {
        if (dp[i] >= v) {
            cout << c - i << endl;
            flag = 1;
            break;
        }
    }
    if (flag == 0) cout << "Impossible" << endl;
    return 0;
}
